function B=EMSqu3D(x_d,y_d,z_d,l,ai,ao)
B_x = triplequad(@(x,y,z)EMSquFuncX(x,y,z,x_d,y_d,z_d,ai,ao)...
    ,-ao/2,ao/2,-ao/2,ao/2,-1/2,l/2);
B_y = triplequad(@(x,y,z)EMSquFuncY(x,y,z,x_d,y_d,z_d,ai,ao)...
    ,-ao/2,ao/2,-ao/2,ao/2,-1/2,l/2);
B_z = triplequad(@(x,y,z)EMSquFuncZ(x,y,z,x_d,y_d,z_d,ai,ao)...
    ,-ao/2,ao/2,-ao/2,ao/2,-1/2,l/2);
B = [B_x B_y B_z];
end



